|
LM ADD TRANSPARENT COLLISION OBJECT
This command adds an object that casts shadows but does not completely block light that passes through it.
LM Add Transparent Collision Object Object Number, Mode
Object Number
The id of the object you want to cast transparent shadows.
Mode
The transparency mode to use, black colour key(0), textured alpha channel(1) or semi-transparent(2).
This command does not return a value.
Any light that passes through this object is allowed to hit objects behind but the light's colour is modified depending on the transparency mode and the texture applied the object. The object must have a texture applied to it, and in the case of mode 1 must also have an alpha channel in the texture (for example .png, .tga and .dds images can have alpha channels, .bmp and .jpg cannot) There is a choice of three different modes for how the light mapper should handle the object. The first (0) is colour key transparency, any point on the object that is textured completely black will become completely transparent to light, any other colour will completely block light. This is useful for things like trees which sometimes have colour key transparency on the leaves. The second mode (1) is alpha channel transparency where an alpha channel value of 0 will allow all the light through unchanged, an alpha channel value of 1 will completely block any light. Any value in between will block a portion of the light and colour it the same colour as the point it passed through on the object. The third mode (2) is semi-transparency which multiplies the incoming light with whatever light it hits on the object and lets it pass through. For example a white light multiplied by a red texture becomes a red light that shines on the objects behind (1,1,1 x 1,0,0 = 1,0,0) but a green light multiplied by a red texture becomes black (0,1,0 x 1,0,0 = 0,0,0) The following picture shows a white light shining on an alpha mapped transparent object, with a smooth alpha from 1.0 (opaque) at the bottom to 0.0 (invisible) at the top, and a semi-transparent object that only uses the colour of the object regardless of its alpha.

|